1. Field of the Technology
The invention relates to Ethernet, and more particularly, to a method for Ethernet data frame learning and forwarding, an Ethernet network and a bridge.
2. Background of the Technology
A conventional Ethernet switch leans the network topology structure by analyzing source addresses of data frames from all networks connected with each other based on a mechanism of learning a source address in an Ethernet data frame and forwarding the Ethernet data frame according to a destination address. For example, a layer-2 switch receives through port 1 a data frame from host A and thus learns that host A is accessible through the network connected to port 1. By such a learning process, the layer-2 switch may establish a forwarding table. Table 1 is an example of the forwarding table.
TABLE 1Host AddressPort Number11.11.11.11.11.11122.22.22.22.22.22133.33.33.33.33.33244.44.44.44.44.443
The layer-2 switch forwards the Ethernet data frame based on the forwarding table. When receiving the Ethernet data frame from one of the ports) the layer-2 switch searches the forwarding table according to the destination address in the Ethernet data frame. If there is a relationship between the destination address and a port of a network bridge in the forwarding table, the Ethernet data frame is forwarded through the port corresponding to the destination address. Otherwise, the Ethernet data frame is forwarded through all the other ports except the port through which the Ethernet data frame is received.
The conventional Ethernet switch is designed to be used in a Local Area Network (LAN). Because there is less client equipment in the LAN, less entries should be set in the Medium Access Control (MAC) forwarding table in the conventional Ethernet switch. However, when the Ethernet technique is introduced into the Metropolitan Area Network (MAN), it is difficult to use the conventional Ethernet technique because the MAC forwarding table has much more entries owing to a greater amount of client equipment, i.e., the scale of the MAC forwarding table is large. In order to solve the problem that the scale of the Ethernet forwarding table is large, the industry introduces such technique as the MAC stack (i.e. MAC in MAC) defined in IEEE 802.1ah. The main idea of the technique of the MAC stack is to add an operator Ethernet data frame header before an Ethernet data frame of a user entering the operator's network, learn and forward the Ethernet data frame in the operator's network according to the operator Ethernet data frame header.
FIG. 1 is a schematic diagram illustrating the relationship between the format of a conventional Ethernet data frame and the format of a MAC in MAC frame. As shown in FIG. 1, in the conventional Ethernet data frame, DA refers to the destination MAC address, SA refers to the source MAC address, Type/Length (T/L) is a field of type or length, Payload is a field of payload and CRC is cycle redundancy check. While in the MAC in MAC frame header, B-DA is the MAC address of destination Backbone Edge Bridge (BEB), B-SA is the MAC address of source BEB, B-TAG is a field with 4 bytes in the MAC in MAC encapsulation format for identifying the service tunnel of an operator's network, I-TAG is a field in the MAC in MAC encapsulation format for identifying different services of user in one service tunnel of an operator's network.
The whole conventional Ethernet data frame is mapped into the payload field in the MAC in MAC frame as the payload.
FIG. 2 is a schematic diagram illustrating the architecture of the MAC in MAC network. As shown in FIG. 2, Client Equipment (CE) is connected to the BEB of the MAC in MAC network of the operator, and there is also a Backbone Core Bridge (BCB) inside the MAC in MAC network. When an Ethernet data frame sent by the CE enters the BEB, the BEB encapsulates a MAC in MAC frame header shown in FIG. 1 into the Ethernet data frame. The BCB learns and forwards the Ethernet data frame according to the B-MAC in the MAC in MAC frame, i.e., according to the B-DA and the B-SA, and the user MAC is shielded from the BCB. When the Ethernet data frame is sent by a BEB to an external network, the MAC in MAC frame header is removed.
It can be seen from the above that, the bridges in the operator's network performs learning and/or forwarding according to the B-MAC of the BEB. Consequently, the scale of the MAC forwarding table inside the BCB is the number of the MAC addresses of the BEB and does not relate to the number of the MAC addresses of the CE. The capacity of the MAC forwarding table of the BCB is thus greatly reduced and the expansibility of the operator's network is improved as well. However, the capacity of the MAC forwarding table in the BEB is proportional to the number of the MAC addresses of the CE because the BEB needs to learn the relationship between the MAC addresses of the CE and the B-MAC. Such situation is not improved when compared with the conventional Ethernet bridge. Meanwhile, the complexity of processing the mapping from the MAC of the CE to the MAC in MAC network of the operator is increased. As described above, the technique of the MAC in MAC reduces the scale of the MAC forwarding table of the Ethernet bridge inside the operator's network. However, for the BEB, the scale of its forwarding table is equivalent to that of conventional Ethernet switch device, without any improvement.